#pragma once

#include <iostream>
#include "util.hpp"

namespace rs_log
{
    using namespace rs_util;
    enum{
        INFO,
        DEBUG,
        WARNING,
        ERROR,
        FATAL
    };

    inline std::ostream& Log(const std::string& level,const std::string& file_name,int line)
    {
        std::string mes = "[";
        mes += level;
        mes += "]";

        mes += "[";
        mes += file_name;
        mes += "]";

        mes += "[";
        mes += std::to_string(line);
        mes += "]";

        mes += "[";
        mes += TimeUtil::GetTimestamp();
        mes += "]";

        std::cout << mes;
        return std::cout;
    }

    #define LOG(level) Log(#level,__FILE__,__LINE__)

}